<script type="text/html" template>
  <link rel="stylesheet" href="{{ layui.setter.base }}assets/css/m-global.css?v={{layui.cache.version}}" media="all">
</script>
<title>
  首页</title>

<div class="layui-card layadmin-header">
  <div class="layui-breadcrumb" lay-filter="breadcrumb">
    <a>
      <cite>首页</cite>
    </a>
  </div>
</div>

<div class="layui-fluid">
  <div class="layui-card">
    <div class="layui-card-body">
      <p>欢迎,来到抖贴后台管理系统</p>
    </div>
  </div>
  <div class="layui-card">
    <header class="layui-card-header">数据统计</header>
    <script id="tplIndex" type="text/html" template lay-url="{{layui.setter.baseUrl+'admin/home'}}">
      <div class="layui-card-body">
        <table class="layui-table">
          <thead>
            <tr>
              <th>当前总用户数</th>
              <th>董事人数</th>
              <th>联创人数</th>
              <th>区代人数</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>{{d.total_user_count||0}}人</td>
              <td>{{d.agent_count||0}}人</td>
              <td>{{d.founder_count||0}}人</td>
              <td>{{d.area_agent_count||0}}人</td>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="layui-card-body">
        <table class="layui-table">
          <thead>
            <tr>
              <th>累计订单总数</th>
              <th>累计订单金额</th>
              <th>累计用户提现</th>
              <th>累计用户当前余额</th>
              <!-- <th>累计平台收益</th> -->
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>{{d.order_count||0}}单</td>
              <td>{{d.total_order_amount||0.00}}</td>
              <td>{{d.total_withdraw_amount||0.00}}</td>
              <td>{{d.total_user_balance||0.00}}</td>
              <!-- <td>{{d.total_earn||0.00}}</td> -->
            </tr>
          </tbody>
        </table>
        <!-- <p class="g-c--gray">说明：累计平台收益 = 累计订单金额 -（累计用户提现 + 累计用户当前余额）</p> -->
      </div>
    </script>

  </div>
</div>

<script>
  layui.use('m-index', layui.factory('m-index'));
</script>